package common.logging;

public class Item {
    String name;
    public String getName() {
		return name;
	}
	public Object getValue() {
		return value;
	}
	public boolean isUnstructured() {
		return unstructured;
	}
	Object value;
    boolean unstructured;
    
    public Item(String name, Object value, boolean unstructured)
    {
    	if (name.contains(" "))
    	{
    		//We don't want to throw exception here, because the code that causes this may never have run during testing.
    		//In live we don't want this to add additional headache, thus we try to log as best as we can.
    		name="FIX_"+name.substring(name.indexOf(' '));
    	}
        this.name = name;
        this.value = value;
        this.unstructured = unstructured;
    }
    public Item(String name, Object value)
    {
    	if (name.contains(" "))
    	{
    		//We don't want to throw exception here, because the code that causes this may never have run during testing.
    		//In live we don't want this to add additional headache, thus we try to log as best as we can.
    		name="FIX_"+name.substring(name.indexOf(' '));
    	}
    	this.name = name;
    	this.value = value;
        unstructured = false;
    }

}
